package com.ryqg.jiaofu.domain.pagequery.pdfinfo;

import cn.hutool.core.util.StrUtil;
import com.ryqg.jiaofu.business.common.Page;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class PDFInfoPageQuery extends Page {
    private String pageCount = "all";

    private String timeRange = "all";

    private String docType = "all";

    private String sortType = "latest";

    private String keyword;

    private String tab = "latest_upload";

    private String classifyId;

    // 业务验证方法
    public boolean isValidKeyword() {
        if (StrUtil.isEmpty(keyword)) {
            return true;
        }
        return !keyword.matches(".*[<>\"'&].*");
    }


}
